home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Telnet 2.7b5 / source / Headers / Preferences.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-19  |  5.8 KB  |  199 lines  |  [TEXT/CWIE]

  1. #define    PREFERENCES_FILE_NAME_STR_ID    1991    // STR resource containing "NCSA Telnet
  2.                                                 //    Preferences" or translated name
  3. #define OUR_PREFS_VERSION_NUMBER 2
  4. #define NO_TIMEOUTS_VERSION         1
  5. // Name of each instance is the resource name.  Resource type TeRm
  6. typedef    struct {
  7.     short
  8.         version;                // Version of this structure
  9.         
  10.     RGBColor
  11.         nfcolor,                // Normal foreground RGB
  12.         nbcolor,                // Normal background RGB
  13.         bfcolor,                // Blinking foreground RGB
  14.         bbcolor,                // Blinking background RGB
  15.         reserved1,                // Reserved by JMB - NCSA
  16.         reserved2;                // Reserved by JMB - NCSA
  17.         
  18.     short
  19.         vtemulation,            // 0 = VT100, 1 = VT220 (supposedly)
  20.         vtwidth,                // Width of the terminal screen in characters
  21.         vtheight,                // Height of the terminal screen in characters
  22.         fontsize,                // Size of DisplayFont to use to display text
  23.         numbkscroll;            // Number of lines to save in scroll buffer
  24.         
  25.     Boolean
  26.         ANSIgraphics,            // Recognize ANSI color sequences
  27.         Xtermsequences,            // Recognize Xterm sequences
  28.         vtwrap,                    // Use VT wrap mode
  29.         emacsmetakey,            // 0 = off, 1 = cmd-control, 2 =  option
  30.         emacsarrows,            // Arrow keys and mouse position are EMACS flavor
  31.         MATmappings,            // Map PageUp, PageDown, Home, End. (MAT == Mark Tamsky)
  32.         eightbit,                // Don't strip the high bit
  33.         clearsave;                // Save cleared lines
  34.         
  35.     Str63
  36.         DisplayFont;            // Font to use to display text
  37.     
  38.     Str32
  39.         AnswerBackMessage;        // Response to send when asked what terminal we are
  40.     Boolean 
  41.         remapKeypad;            //remap keypad (2.7 CCP)
  42.     short
  43.         padding[98];            // So I'm generous....
  44. }    TerminalPrefs;
  45. #define    TERMINALPREFS_RESTYPE    'TeRm'
  46. #define    TERMINALPREFS_APPID        1991        // The "<Default>" terminal seed copy
  47.  
  48. // Name of each instance is the resource name.  Resource type SeSn
  49. typedef    struct {
  50.     short
  51.         version;                // Version of this structure
  52.         
  53.     short
  54.         port,                    // Port to connect to
  55.         tektype,                // -1 = inhibit, 0 = 4014, 1 = 4105
  56.         pastemethod,            // 0 = quick, 1 = block
  57.         pasteblocksize;            // Size of blocks to paste if using block mode
  58.     unsigned long
  59.         ip_address;                // IP address of the host
  60.  
  61.     Boolean
  62.         forcesave,                //
  63.         crmap,                    // Strange Bezerkley 4.3 CR mode needed
  64.         linemode,                // Allow linemode to be used
  65.         showlowlevelerrors,        // Not Used anymore
  66.         tekclear,                // Clear TEK window vs. create new one
  67.         halfdup;                // Half duplex required
  68.         
  69.     char
  70.         bksp,                    // 0 DELETE = BKSP, 1 DELETE = DELETE
  71.         ckey,
  72.         skey,
  73.         qkey;
  74.  
  75.     Str32
  76.         TerminalEmulation,        // Name of terminal emulator to use
  77.         TranslationTable;        // Name of translation table to use by default
  78.  
  79.     Str63
  80.         hostname;                // The DNS name of the host
  81.         
  82.     Boolean
  83.         authenticate,            // Kerberos authentication
  84.         encrypt,                // Encrypted session
  85.         localecho,                // Force local echo on?
  86.         reserved1;                // Reserved by JMB - NCSA
  87.     
  88.     short
  89.         NetBlockSize;            // Size of read buffer (2.7 CCP)
  90.     short
  91.         padding[98];            // Disk space is cheap....
  92. }    SessionPrefs;
  93. #define    SESSIONPREFS_RESTYPE    'SeSn'
  94. #define SESSIONPREFS_APPID        1991        // The "<Default>" session seed copy
  95.  
  96. // Only one instance of this resource type.  Resource type PrEf
  97. typedef    struct    {
  98.     short
  99.         version;                // Version of this resource
  100.         
  101.     short
  102.         CursorType,                // 0 = block, 1 = underscore, 2 = vertical line
  103.         CopyTableThresh;        // Copy table threshold
  104.         
  105.     long
  106.         TimeSlice;                // Timeslice passed to WaitNextEvent
  107.         
  108.     ResType
  109.         CaptureFileCreator;        // Creator signature for session capture files
  110.         
  111.     Boolean
  112.         WindowsDontGoAway,        // Connection's windows remain open after connection close
  113.         StaggerWindows,            // Stagger connection windows
  114.         CommandKeys,            // Use command key shortcuts for menus
  115.         RemapTilde,                // Remap “~” to escape
  116.         BlinkCursor,            // Blink the cursor
  117.         KeyPadAndFuncMenus;        // Show Keypad and Function key menus
  118.  
  119.     short
  120.         OpenTimeout,            // Time to Open Connections in seconds (CCP 2.7)
  121.         SendTimeout,            // Time to Send Data (and receive ACK) (CCP 2.7)
  122.         StaggerWindowsOffset,   // Allow user to specify how much windows are staggered
  123.         NotifyUser,
  124.         destroyKTickets;        //destroy kerberos tickets when window closes
  125.  
  126.     short
  127.         padding[96];            // Memory is getting cheap too....
  128. }    ApplicationPrefs;
  129. #define    APPLICATIONPREFS_RESTYPE    'PrEf'
  130. #define    APPLICATIONPREFS_ID            1991
  131. #define    APPLICATIONPREFS_APPID        1990
  132.  
  133. extern    ApplicationPrefs    *gApplicationPrefs;
  134.  
  135. // Only one instance of this structure.  Resource FTPs
  136. typedef    struct {
  137.     short
  138.         version;                // Version of this resource
  139.  
  140.     short
  141.         ServerState;            // 0 = off, 1 = no protection, 2 = password protection
  142.         
  143.     OSType
  144.         BinaryCreator,            // Default creator for files transferred in binary mode
  145.         BinaryType,                // Default type for files transferred in binary mode
  146.         TextCreator;            // Default creator for file transferred in ASCII mode
  147.         
  148.     Boolean
  149.         ShowFTPlog,                // FTP log defaults to visible
  150.         DNSlookupconnections,    // Translate IP of connecting hosts to DNS names for log
  151.         UseMacBinaryII,            // Allow MacBinary II
  152.         unused1,                // Unused
  153.         unused2,                // Unused
  154.         ResetMacBinary,            // Reset MacBinary after each transfer
  155.         DoISOtranslation;        // Use ISO translation
  156.  
  157.     short
  158.         padding[100];
  159. }    FTPServerPrefs;
  160. #define    FTPSERVERPREFS_RESTYPE    'FTPs'
  161. #define    FTPSERVERPREFS_ID         1991
  162. #define    FTPSERVERPREFS_APPID     1990
  163.  
  164. extern    FTPServerPrefs    *gFTPServerPrefs;
  165.  
  166. // Username is the resource name.  Resource type FTPu
  167. typedef    struct {
  168.     short
  169.         version;                // Version of this resource
  170.     Str32
  171.         EncryptedPassword,        // Encrypted form of user's password
  172.         DefaultDirVolName;        // Name of the volume containing user's default directory
  173.         
  174.     long
  175.         DefaultDirDirID;        // DirID of the user's default directory
  176.  
  177.     Boolean
  178.         UserCanCWD;                // User is allowed to change directories
  179.         
  180.     short
  181.         padding[20];            // Some padding for the future
  182. }    FTPUser;
  183. #define    FTPUSER                    'FTPu'
  184.  
  185. // >>>> FTP Client Prefs? <<<    
  186.  
  187. typedef    struct {
  188.     TerminalPrefs
  189.         **terminal;
  190.     SessionPrefs
  191.         **session;
  192.     Str255
  193.         WindowName;
  194.     short
  195.         ftpstate;
  196.     Rect
  197.         WindowLocation;    
  198. }    ConnInitParams;
  199.